<%@ page language="java" pageEncoding="utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%
String baseUrl = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/";
%>
<!DOCTYPE html>
<html>
<base href="<%=baseUrl%>">
<meta charset="utf-8">
<head>
	<title><%=title%></title>
	<link rel="stylesheet" type="text/css" href="static_front/css/bootstrap.min.css">
	<!-- <link rel="stylesheet" type="text/css" href="static_front/css/font-awesome.css"> -->
	 <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.css">
	 <link rel="stylesheet" type="text/css" href="static_front/css/common.css">
	 
</head>
<body>
<!--导航栏START-->
<nav class="navbar navbar-expand-md bg-light border-bottom">
  <a class="navbar-brand" href="#"><img src="https://7n.w3cschool.cn/statics/images/logonew2.png" width="120" /></a>
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <div class="collapse navbar-collapse" id="navbarCollapse">
    <ul class="navbar-nav mr-auto">
      <li class="nav-item active">
        <a class="nav-link" href="./">首页 <span class="sr-only">(current)</span></a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="./">课程列表</a>
      </li>
      <li class="nav-item">
        <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true"></a>
      </li>
    </ul>
    <div class="text-muted mr-3">
    <c:if test="${!empty sessionScope.user}">
    	hi, <a href="my/orderList.do">${sessionScope.user.mobile}</a>, <a href="user/logout.do">退出</a>
    </c:if>
    <c:if test="${empty sessionScope.user}">
    <a href="login.jsp">登录</a>
    </c:if>
    <a href="my/cart.do">购物车</a>
    </div>
    <form class="form-inline mt-2 mt-md-0" method="get" action="course/search.do">
      <input class="form-control mr-sm-2" type="text" placeholder="" aria-label="搜索" name="kw" value="${param.kw}">
      <button class="btn btn-outline-success my-2 my-sm-0" type="submit">搜索</button>
    </form>
  </div>
</nav>
<!--导航栏END-->
<%-- <div class="nav">
	<%
	if(session.getAttribute("username")==null) {
	%>
	<a href="login.jsp">登录</a> <a href="reg.jsp">注册</a>
	<%} else {%>
	你好, <%=session.getAttribute("username")%> <a href="logout?action=logout">退出</a>
	<% } %>
</div> --%>